<template>
	<view>
		<view :style="{height: systemBarHeight + 'px'}">
		</view>
		<view class="navbar">
			<uni-nav-bar @clickLeft="fh" :border="false" left-icon="left" title="选择产品" />
		</view>
		
		
		<view class="product" >
			<view class="productlist">
				<view class="productlist_item" :style="{background:current==index?'#DEEBFF':'',border:current==index?'2rpx solid #1677FF':''}" v-for="(item,index) in productList" :key="index" @click="change(index)">
					<view class="productlist_item_lf">
						<image src="/static/logo.png" mode=""></image>
					</view>
					
					<view class="productlist_item_rg">
						<view class="productlist_item_rg_tit">
							<text>CyberDog仿生四足机器人（工程探索版）</text>
						</view>
						
						<view class="productlist_item_bom">
							<view class="productlist_item_bom_lf">
								<text class="type1">身高</text>
								<text class="type2">400mm</text>
							</view>
							<view class="productlist_item_bom_lf">
								<text class="type1">体重</text>
								<text class="type2">14kg</text>
							</view>
						
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<view class="bt">
			<text>选择</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemBarHeight: 0,
				current:0,
				productList:[
					{
						tit:'CyberDog仿生四足机器人（工程探索版）'
					},
					{
						tit:'CyberDog仿生四足机器人（工程探索版）'
					},
					{
						tit:'CyberDog仿生四足机器人（工程探索版）'
					}
				]
			}
		},
		mounted() {
			this.getSysteminfo()
		},
		methods: {
			getSysteminfo() {
				uni.getSystemInfo({
					success: res => {
						this.systemBarHeight = res.statusBarHeight;
					}
				});
			},
			/* 返回 */
			fh() {
				uni.navigateBack({
					delta: 1 // 返回的页面层级，1表示返回上一页
				});
			},
			change(index){
				this.current=index
			}
		}
	}
</script>

<style lang="scss" scoped>
.product {
		width: 91%;
		margin: auto;
		
		.productlist {
			.productlist_item {
				display: flex;
				margin-bottom: 30rpx;
				height: 180rpx;
				align-items: center;
				border: 2rpx solid #ffffff;
				border-radius: 15rpx;
				.productlist_item_lf {
					display: flex;align-items: center;
					>image{
						width: 229rpx;
						height: 172rpx;
						border-radius: 0rpx 0rpx 0rpx 0rpx;
					}
				}
				.productlist_item_rg{
					margin-left: 30rpx;
					.productlist_item_rg_tit{
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 31rpx;
						color: #152034;
					}
					.productlist_item_bom{
						display: flex;
						align-items: center;
						margin-top: 17rpx;
						.productlist_item_bom_lf{
							display: flex;
							flex-direction: column;
							margin-right: 45rpx;
							.type1{
								font-family: PingFang SC, PingFang SC;
								font-weight: 400;
								font-size: 23rpx;
								color: #7D8CA4;
							}
							.type2{
								font-family: PingFang SC, PingFang SC;
								font-weight: 400;
								font-size: 23rpx;
								color: #45516B;
								margin-top: 10rpx;
							}
						}
					
					}
					
					
					
				}

			}
		}
	}
	
	.bt{
		width: 626rpx;
		height: 95rpx;
		background: #1677FF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 34rpx;
		color: #FFFFFF;
	display: flex;align-items: center;
	justify-content: center;
	margin: 60rpx auto 0;
	}
</style>